package com.ruoyi.project.card.service.impl;

import java.util.List;
        import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.card.mapper.AlumniSwiperMapper;
import com.ruoyi.project.card.domain.AlumniSwiper;
import com.ruoyi.project.card.service.IAlumniSwiperService;

/**
 * 轮播图管理Service业务层处理
 *
 * @author hongwj
 * @date 2024-05-03
 */
@Service
public class AlumniSwiperServiceImpl implements IAlumniSwiperService {
    @Autowired
    private AlumniSwiperMapper alumniSwiperMapper;

    /**
     * 查询轮播图管理
     *
     * @param id 轮播图管理主键
     * @return 轮播图管理
     */
    @Override
    public AlumniSwiper selectAlumniSwiperById(Long id) {
        return alumniSwiperMapper.selectAlumniSwiperById(id);
    }

    /**
     * 查询轮播图管理列表
     *
     * @param alumniSwiper 轮播图管理
     * @return 轮播图管理
     */
    @Override
    public List<AlumniSwiper> selectAlumniSwiperList(AlumniSwiper alumniSwiper) {
        return alumniSwiperMapper.selectAlumniSwiperList(alumniSwiper);
    }

    /**
     * 新增轮播图管理
     *
     * @param alumniSwiper 轮播图管理
     * @return 结果
     */
    @Override
    public int insertAlumniSwiper(AlumniSwiper alumniSwiper) {
                alumniSwiper.setCreateTime(DateUtils.getNowDate());
            return alumniSwiperMapper.insertAlumniSwiper(alumniSwiper);
    }

    /**
     * 修改轮播图管理
     *
     * @param alumniSwiper 轮播图管理
     * @return 结果
     */
    @Override
    public int updateAlumniSwiper(AlumniSwiper alumniSwiper) {
                alumniSwiper.setUpdateTime(DateUtils.getNowDate());
        return alumniSwiperMapper.updateAlumniSwiper(alumniSwiper);
    }

    /**
     * 批量删除轮播图管理
     *
     * @param ids 需要删除的轮播图管理主键
     * @return 结果
     */
    @Override
    public int deleteAlumniSwiperByIds(Long[] ids) {
        return alumniSwiperMapper.deleteAlumniSwiperByIds(ids);
    }

    /**
     * 删除轮播图管理信息
     *
     * @param id 轮播图管理主键
     * @return 结果
     */
    @Override
    public int deleteAlumniSwiperById(Long id) {
        return alumniSwiperMapper.deleteAlumniSwiperById(id);
    }
}
